package com.wen.mall.cart.service;

import com.wen.mall.cart.vo.CartItemVo;
import com.wen.mall.cart.vo.CartVo;

import java.util.List;
import java.util.concurrent.ExecutionException;

/**
 * @description: TODO
 * @created: IntelliJ IDEA
 * @author: QWQ
 * @createTime: 2022/10/11 19:15
 **/
public interface CartService {
    /**
     * TODO
     * @param
     * @return CartVo
     * @throws ExecutionException
     * @throws InterruptedException
     */
    CartVo getCart() throws ExecutionException, InterruptedException;

    /**
     * TODO
     * @param skuId
     * @param num
     * @return CartItemVo
     * @throws ExecutionException
     * @throws InterruptedException
     */
    CartItemVo addToCart(Long skuId, Integer num) throws ExecutionException, InterruptedException;

    CartItemVo getCartItem(Long skuId);

    void clearCartInfo(String cartKey);

    void checkItem(Long skuId, Integer checked);

    void changeItemCount(Long skuId, Integer num);

    void deleteIdCartInfo(Integer skuId);

    List<CartItemVo> getUserCartItems();
}
